﻿package com.atn.edamame.tools
{
	import flash.events.*;
    import flash.display.*;
	import flash.text.*;
	

	import com.atn.edamame.*;
	
	import mx.accessibility.UIComponentAccImpl;
	import mx.controls.Label;
	import mx.controls.TextInput;
	import mx.core.IUIComponent;
	import org.flashdevelop.utils.FlashConnect;
	import mx.core.UIComponent;
	import mx.containers.VBox; 
	
    public class EdamameControl extends EdamameObject
    {
		[Embed(source='../../../../pipe.png')]
		private var EmbedImage:Class;
		public var description:String;
		protected var descriptionLabel:Label;
        public function  EdamameControl()
        {

        }
	
		public function exec(variable:Object, onFinish:Function):void
		{
			onFinish({result:"ok"});
		}
		
		public override function enterFrame():int
		{
			return 1;
		}
		
        public override function init():void {
			descriptionLabel = new Label();
			descriptionLabel.text = description;
			descriptionLabel.width = 150;
			descriptionLabel.height = 35;
            addChild(descriptionLabel);
			var ui:UIComponent = new UIComponent();
			var img:Bitmap = new EmbedImage() as Bitmap;
			ui.width = 48;
			ui.height = 48;
			ui.addChild(img);
			addChild(ui);
			this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
			this.height = 90;
			this.width = 150;
        }
    }
}
